package com.asset.modules.assets.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;


import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author asset
 * @since 2020-09-02
 */
@Data
//@EqualsAndHashCode(callSuper = false)
//@Accessors(chain = true)
//@ApiModel(value = "固资表数据，公司编码与名称为非必填字段")
@HeadRowHeight(40)
@ContentRowHeight(30)
public class Asset extends Model<Asset> {

    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 卡片
     */
    @ExcelProperty(value = {"卡片编号"}, index =1)
    @ColumnWidth(20)
    private String card;

    /**
     * 资产编码
     */
    @ExcelProperty(value = {"资产编号"}, index =2)
    @ColumnWidth(20)
    private String assetCode;

    /**
     * 管理编码
     */
    @ExcelIgnore
    private String manageCode;

    /**
     * 验收编码
     */
    @ExcelIgnore
    private String checkCode;

    /**
     * 设备编码
     */
    @ExcelIgnore
    private String deviceCode;

    /**
     * 设备名称
     */
    @ExcelProperty(value = {"设备名称"}, index =3)
    @ColumnWidth(25)
    private String deviceName;

    /**
     * 购置日期
     */
    @ExcelProperty(value = {"购置日期"}, index =4)
    @ColumnWidth(20)
    private String  buyTime;

    /**
     * 账面数量
     */
    @ExcelProperty(value = {"账面数", "数量"}, index =5)
    @ColumnWidth(15)
    private Long registerNum;

    /**
     * 账面金额
     */
    @ExcelProperty(value = {"账面数", "购置金额"}, index =6)
    @ColumnWidth(15)
    private double registerMoney;

    /**
     * 盘点数量
     */
    @ExcelProperty(value = {"实际盘点数", "数量"}, index =7)
    @ColumnWidth(15)
    private Long checkNum;

    /**
     * 盘点金额
     */
    @ExcelProperty(value = {"实际盘点数", "金额"}, index =8)
    @ColumnWidth(15)
    private double checkMoney;

    /**
     * 盈亏数量
     */
    @ExcelProperty(value = {"盈亏", "数量"}, index =9)
    @ColumnWidth(15)
    private Long earnMun;

    /**
     * 盈亏金额
     */
    @ExcelProperty(value = {"盈亏", "金额"}, index =10)
    @ColumnWidth(15)
    private double earnMoney;

    /**
     * 净值
     */
    @ExcelProperty(value = {"净值"}, index = 11)
    @ColumnWidth(15)
    private double value;

    /**
     * 所属公司ID
     */
    @ExcelIgnore
    private String projectId;

    /**
     * 公司编码
     */
    @ExcelIgnore
    private String projectCode;

    /**
     * 状态
     */
    @ExcelProperty(value = {"状态"})
    @ColumnWidth(15)
    private String status;

    /**
     * 公司名称
     */
    @ExcelProperty(value = {"所属公司"}, index = 12)
    @ColumnWidth(20)
    private String projectName;

    /**
     * 使用部门
     */
    @ExcelProperty(value = {"使用部门"}, index = 13)
    @ColumnWidth(30)
    private String department;

    /**
     * 使用人
     */
    @ExcelProperty(value = {"使用人"}, index = 14)
    @ColumnWidth(10)
    private String user;

    /**
     * 存放地点
     */
    @ExcelProperty(value = {"存放地点"}, index = 15)
    @ColumnWidth(30)
    private String place;



    /**
     * 使用年限
     */
    @ExcelProperty(value = {"使用年限"}, index = 17)
    @ColumnWidth(20)
    private int totalYear;


    @ExcelIgnore
    private String companyId;

    @ExcelIgnore
    private String companyCode;

    @ExcelIgnore
    private String companyName;

    /**
     * 更新时间
     */
    @ExcelIgnore
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @ExcelIgnore
    private LocalDateTime createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
